from flask import Flask
import nacos

app = Flask(__name__)

# Nacos server details
SERVER_ADDRESSES = "10.19.95.31:8848"
NAMESPACE = "c6312e73-f0af-4604-9d31-2cac9ac09f33"

# Create a Nacos client instance
client = nacos.NacosClient(SERVER_ADDRESSES, namespace=NAMESPACE)

if __name__ == '__main__':
    client.add_naming_instance("python-nacos", None, 5000)
    app.run(host='0.0.0.0', port=5000)